
data1<-read.csv("AmorimNeto_extended.csv")

## Separates the data into the Amorim Neto's dataset (AN) and the updated Bersch, Lopez, Taylor dataset (BLT)
data_AN <- data1[ which(data1$source=='1'), ]
data_BLT <- data1[ which(data1$source!='1'), ]

m1.2 <-lm(CDISC.B ~ CCRATE1 + ELAPSE + IDRANGE2AN, data = data_AN)
m1.3 <-lm(CDISC.B ~ CCRATE1 + ELAPSE + IDRANGE2AN, data = data_BLT)
m1.4 <-lm(CDISC.B ~ CCRATE1 + ELAPSE + IDRANGE2AN, data = data1)


stargazer(m1.2, m1.3, m1.4, type='latex', header=FALSE, no.space=TRUE, omit.stat=c("LL","ser","f"), title= "Table 1", column.labels=c("1.2","1.3","1.4"), digits = 5 )

m2.1 <-lm(CDISC.B ~ CCRATE2 + ELAPSE + IDRANGEBLT, data = data_AN)
m2.2 <-lm(CDISC.B ~ CCRATE2 + ELAPSE + IDRANGEBLT, data = data_BLT)
m2.3 <-lm(CDISC.B ~ CCRATE2 + ELAPSE + IDRANGEBLT, data = data1)


m2.1 <-lm(CDISC.B ~ CCRATE2 + ELAPSE + IDRANGEBLT, data = data_AN)
m2.2 <-lm(CDISC.B ~ CCRATE2 + ELAPSE + IDRANGEBLT, data = data_BLT)
m2.3 <-lm(CDISC.B ~ CCRATE2 + ELAPSE + IDRANGEBLT, data = data1)
m2.1b <-lm(CDISC.B ~ CCRATE2 + ELAPSE + IDHETERO, data = data_AN)
m2.2b <-lm(CDISC.B ~ CCRATE2 + ELAPSE + IDHETERO, data = data_BLT)
m2.3b <-lm(CDISC.B ~ CCRATE2 + ELAPSE + IDHETERO, data = data1)

stargazer(m2.1,m2.2, m2.3,m2.1b,m2.2b, m2.3b, type='latex', header=FALSE, no.space=TRUE, omit.stat=c("LL","ser","f"), title= "Table 2a", column.labels=c("2.1","2.2","2.3") )


